TARGET  = hello
SRCS    = main.c
OBJS    = main.o
COMMLIB = -lpthread -lclntsh

LINKER  = $(CC)
RM      = /bin/rm -f
PROC    = proc

PROCFLAGS = code=ANSI_C ireclen=2048 oreclen=2048 parse=none\
    userid=xunixing/xunixing@wxh sqlcheck=full\
    include=/usr/include\
    include=/usr/include/linux\
    include=/usr/local/include\
    include=/usr/lib/gcc/i486-linux-gnu/4.3.3/include

CFLAGS  = -I$(ORACLE_HOME)/precomp/public\
          -L$(ORACLE_HOME)/lib

.SUFFIXES: .o .c .pc

.c.o:
	$(CC) -c $(CFLAGS) $<

.pc.c:
	@echo "PROC ."
	-$(PROC) iname=$*.pc $(PROCFLAGS)

$(TARGET): $(SRCS) $(OBJS)
	$(CC) -o $@ $(OBJS) $(CFLAGS) $(COMMLIB)

clean :
	$(RM) $(TARGET) $(OBJS)  *.lis 
